package com.zjipc.mpjdemo.controller;

import com.zjipc.mpjdemo.domain.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class DemoController {

    @GetMapping("/test")
    public User test() {
        User user = new User();
        user.setName("zjipc");
        user.setId(1L);
        user.setSex(0);
        return user;
    }
}
